﻿using System;
using Codemonk.Pease.Demo.Interfaces;
using System.Web;

namespace Codemonk.Pease.Demo.Services
{
    public class ILoginImplementation : ILogin
    {
        public void Login(User user, Action<Exception> error, Action<bool> back)
        {
            back(user.Name == "codemonk" && user.Password == "123");
        }

        public HttpContext CurrentContext { get; set; }

        public void Login(string name, Action<Exception> error, Action<string> back)
        {
            back("hello " + CurrentContext.Request.UserHostAddress);
        }
    }
}
